package team.se.tms.po;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import team.se.tms.annotation.Regex;

import java.io.Serializable;
import java.util.Date;

/**
 * 教师信息类
 *
 * @author qingx
 * @date 018/11/25
 */
@Data
public class TeacherInfo implements Serializable {

    //教师工号
    @Regex("^[a-zA-Z0-9]{6}$")
    private String teaId;

    //教师姓名
    @Regex("^[\\u4e00-\\u9fa5]{2,8}$")
    private String teaName;

    //教师性别
    @Regex("^[0|1]$")
    private String teaSex;

    //出生日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date teaBirth;

    //入职年份
    @DateTimeFormat(pattern = "yyyy")
    private Date teaEntryYear;

    //在职状态
    @Regex("^[\\u4e00-\\u9fa5]{1,4}$")
    private String teaWorkState;

    //联系方式
    @Regex("^(13[0-9]|14[5|7]|15[0-9]|18[0-9])\\d{8}$")
    private String teaTelephone;

    //教师学历
    @Regex("^[\\u4e00-\\u9fa5]{1,6}$")
    private String teaEducation;

    //教师职位
    @Regex("^[\\u4e00-\\u9fa5]{1,8}")
    private String teaPosition;

    //用户id
    @Regex("^[a-zA-Z0-9]{16}$")
    private String userId;

}